package com.wc;

import com.wc.domain.Book;
import com.wc.service.BookService;
import com.wc.service.impl.BookServiceImpl;

import java.util.List;

/**
 * Hello world!
 */
public class App {
//1、查看所有的图书，并将其保存到指定文件中
//2、查找图书，要求至少能够【分别】根据ISBN、书名、作者、价格区间进行查找
//3、增加图书
//4、修改图书
    private BookService bookService = new BookServiceImpl();

    public static void main(String[] args) {
        App app = new App();

        System.out.println("查看所有的图书");
        List<Book> list = app.selectAllBooks();
        list.forEach(System.out::println);
    }

    private List<Book> selectAllBooks() {
        List<Book> res = bookService.getAllBooks();
        return  res;
    }
}